package cc.ucanuup.app;

import java.util.HashSet;
import java.util.Set;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

import cc.ucanuup.config.activti.servlet.JsonpCallbackFilter;

/**
 * Description: TODO[描述该类概要功能介绍]
 *
 * @author guwenbin
 * @date 2017年11月29日
 * @version 1.0
 */
@SpringBootApplication
/*@ComponentScan("com.bozhon")
@EnableAutoConfiguration(exclude = {
		org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class,
		org.activiti.spring.boot.SecurityAutoConfiguration.class
})*/
@ComponentScan({"org.activiti.rest.diagram", "com.westcatr.rd"})
@EnableAsync
public class App {

	public static void main(String[] args) {
		// 启动控制层
		SpringApplication app = new SpringApplication(App.class);
		app.setWebEnvironment(true);
		//app.setShowBanner(false);
		Set<Object> set = new HashSet<Object>();
		//set.add("classpath:applicationContext.xml");
		app.setSources(set);
		app.run(args);
	}

	@Bean
	public JsonpCallbackFilter filter(){
		return new JsonpCallbackFilter();
	}
}

